#ifndef CRYPTOGRAPHY_H
#define CRYPTOGRAPHY_H

#include <cryptopp/rsa.h>
#include <cryptopp/osrng.h>
#include <cryptopp/files.h>
#include <cryptopp/hex.h>


#include <iostream>
#include <string>

using namespace std;
using namespace CryptoPP;

class cryptography
{

public:
    cryptography();
    cryptography(string name);
    void create_key();
    void Save(const string& filename, const BufferedTransformation& bt);
    void Load(const string& filename, BufferedTransformation& bt);

    string getKey();
    string encryptMsg(string const& Data);
    string decryptMsg(string const& Data);

    string HashSingleData(string const& strData);
    char HashMultiData(std::string const& strDataPart1, std::string const& strDataPart2, std::string const& strDataPart3);

private:

    AutoSeededRandomPool rng;
    void SavePrivateKey(const string& filename, const PrivateKey& key);
    void SavePublicKey(const string& filename, const PublicKey& key);
    void LoadPrivateKey(const string& filename, PrivateKey& key);
    void LoadPublicKey(const string& filename, PublicKey& key);
};

#endif // CRYPTOGRAPHY_H
